From 98009c2ad02f691d9418095cf3e7b65bffdd588b Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Thu, 23 Mar 2006 14:34:35 +0100 Subject: [PATCH] Use *args inside FAIL and SKIP so that it is possible to call these functions with multiple arguments, printf style. This is already being done in some cases (causing an exception of course). Signed-off-by: Ewan Mellor --- tools/xm-test/lib/XmTestLib/Test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/xm-test/lib/XmTestLib/Test.py b/tools/xm-test/lib/XmTestLib/Test.py index 32d1574eae..ee49ccd358 100644 --- a/tools/xm-test/lib/XmTestLib/Test.py +++ b/tools/xm-test/lib/XmTestLib/Test.py @@ -131,12 +131,12 @@ def becomeNonRoot(): if os.geteuid() == 0: FAIL("Could not become a non-root user") -def FAIL(reason): - print "\nREASON: %s" % reason +def FAIL(format, *args): + print "\nREASON:", (format % args) sys.exit(TEST_FAIL) -def SKIP(reason): - print "\nREASON: %s" % reason +def SKIP(format, *args): + print "\nREASON:", (format % args) sys.exit(TEST_SKIP) def saveLog(logText, filename=None): -- 2.30.2